import Vuex from 'vuex'
import axios from '../../http/http'


const store ={
    namespaced:true,
    state() {
        return{
            menuList:[]  
        }
        
    },
    mutations:{
        menuListMutations(state,menuList){
          state.menuList = menuList

        }
    },
  
    actions: {
        menuListAction(context){
            axios.get("/menulist").then(
                res=>{
                    if(res.status==200){
                        const data = res.data.list
                        context.commit("menuListMutations",data)
                    }
                }
            )
          }
    },
    qetters: {

    },
    modules: {

    },
}

export default store
